.class public Lcom/glympse/android/glympse/ViewFavorites;
.super Landroid/widget/FrameLayout;
.source "ViewFavorites.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/glympse/android/glympse/ViewFavorites$MyGlympseView;,
        Lcom/glympse/android/glympse/ViewFavorites$OnClickedDelete;,
        Lcom/glympse/android/glympse/ViewFavorites$OnClickedItem;,
        Lcom/glympse/android/glympse/ViewFavorites$OnClickedRename;,
        Lcom/glympse/android/glympse/ViewFavorites$OnClickedSend;,
        Lcom/glympse/android/glympse/ViewFavorites$OnClickedShortcut;,
        Lcom/glympse/android/glympse/ViewFavorites$TicketAdapter;
    }
.end annotation


# instance fields
.field public m_fExpanded:Z

.field public m_oGlympseView:Lcom/glympse/android/glympse/ViewFavorites$MyGlympseView;

.field private m_oListView:Landroid/widget/ListView;

.field private m_oTextView:Landroid/widget/TextView;

.field private m_oTicketAdapter:Lcom/glympse/android/glympse/ViewFavorites$TicketAdapter;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2
    .parameter "oContext"

    .prologue
    const/4 v1, 0x0

    .line 53
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 41
    new-instance v0, Lcom/glympse/android/glympse/ViewFavorites$MyGlympseView;

    invoke-direct {v0, p0}, Lcom/glympse/android/glympse/ViewFavorites$MyGlympseView;-><init>(Lcom/glympse/android/glympse/ViewFavorites;)V

    iput-object v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oGlympseView:Lcom/glympse/android/glympse/ViewFavorites$MyGlympseView;

    .line 43
    iput-object v1, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oListView:Landroid/widget/ListView;

    .line 44
    iput-object v1, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oTextView:Landroid/widget/TextView;

    .line 46
    iput-object v1, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oTicketAdapter:Lcom/glympse/android/glympse/ViewFavorites$TicketAdapter;

    .line 48
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_fExpanded:Z

    .line 54
    return-void
.end method

.method private BuildTicketList()V
    .locals 3

    .prologue
    .line 110
    new-instance v0, Lcom/glympse/android/glympse/ViewFavorites$TicketAdapter;

    invoke-virtual {p0}, Lcom/glympse/android/glympse/ViewFavorites;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v2

    iget-object v2, v2, Lcom/glympse/platform/Platform;->m_oFavoriteList:Lcom/glympse/platform/common/FavoriteList;

    iget-object v2, v2, Lcom/glympse/platform/common/FavoriteList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-direct {v0, p0, v1, v2}, Lcom/glympse/android/glympse/ViewFavorites$TicketAdapter;-><init>(Lcom/glympse/android/glympse/ViewFavorites;Landroid/content/Context;Lcom/glympse/platform/GVector$Tickets;)V

    iput-object v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oTicketAdapter:Lcom/glympse/android/glympse/ViewFavorites$TicketAdapter;

    .line 111
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oListView:Landroid/widget/ListView;

    iget-object v1, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oTicketAdapter:Lcom/glympse/android/glympse/ViewFavorites$TicketAdapter;

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 113
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oListView:Landroid/widget/ListView;

    invoke-virtual {v0}, Landroid/widget/ListView;->requestFocus()Z

    .line 114
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oListView:Landroid/widget/ListView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setSelection(I)V

    .line 115
    return-void
.end method

.method private Send(Lcom/glympse/platform/common/Ticket;Z)V
    .locals 4
    .parameter "oTicket"
    .parameter "fLongClick"

    .prologue
    .line 149
    sget-object v0, Lcom/glympse/android/glympse/Glympse$EViews;->SendGlympse:Lcom/glympse/android/glympse/Glympse$EViews;

    sget-object v1, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    invoke-virtual {v1}, Lcom/glympse/android/glympse/Glympse;->GetCurrentEView()Lcom/glympse/android/glympse/Glympse$EViews;

    move-result-object v1

    if-eq v0, v1, :cond_0

    .line 152
    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v0, v0, Lcom/glympse/android/glympse/Glympse;->m_oViewSendGlympse:Lcom/glympse/android/glympse/ViewSendGlympse;

    const/4 v1, 0x1

    const/4 v2, 0x0

    const-string v3, "fav"

    invoke-virtual {v0, p1, v1, v2, v3}, Lcom/glympse/android/glympse/ViewSendGlympse;->SetTicket(Lcom/glympse/platform/common/Ticket;ZZLjava/lang/String;)V

    .line 155
    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    invoke-virtual {v0}, Lcom/glympse/android/glympse/Glympse;->PopView()Lcom/glympse/android/glympse/Glympse$EViews;

    .line 158
    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    sget-object v1, Lcom/glympse/android/glympse/Glympse$EViews;->SendGlympse:Lcom/glympse/android/glympse/Glympse$EViews;

    sget-object v2, Lcom/glympse/android/glympse/Glympse$EAnimations;->FadeIn:Lcom/glympse/android/glympse/Glympse$EAnimations;

    sget-object v3, Lcom/glympse/android/glympse/Glympse$EAnimations;->FadeIn:Lcom/glympse/android/glympse/Glympse$EAnimations;

    invoke-virtual {v0, v1, v2, v3}, Lcom/glympse/android/glympse/Glympse;->PushView(Lcom/glympse/android/glympse/Glympse$EViews;Lcom/glympse/android/glympse/Glympse$EAnimations;Lcom/glympse/android/glympse/Glympse$EAnimations;)Lcom/glympse/android/glympse/Glympse$EViews;

    .line 161
    if-eqz p2, :cond_0

    .line 163
    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v0, v0, Lcom/glympse/android/glympse/Glympse;->m_oViewSendGlympse:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-virtual {v0}, Lcom/glympse/android/glympse/ViewSendGlympse;->DoSend()V

    .line 166
    :cond_0
    return-void
.end method

.method private SetEmptyText()V
    .locals 2

    .prologue
    .line 103
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oTextView:Landroid/widget/TextView;

    const v1, 0x7f0a0094

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    .line 104
    return-void
.end method

.method private UpdateExpandStyles()V
    .locals 2

    .prologue
    .line 120
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "EXPANDED:"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-boolean v1, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_fExpanded:Z

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    .line 122
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oListView:Landroid/widget/ListView;

    iget-boolean v1, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_fExpanded:Z

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setItemsCanFocus(Z)V

    .line 124
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oListView:Landroid/widget/ListView;

    iget-boolean v1, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_fExpanded:Z

    if-eqz v1, :cond_0

    const/high16 v1, 0x2

    :goto_0
    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setDescendantFocusability(I)V

    .line 125
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oListView:Landroid/widget/ListView;

    iget-boolean v1, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_fExpanded:Z

    if-eqz v1, :cond_1

    const/4 v1, 0x0

    :goto_1
    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    .line 128
    return-void

    .line 124
    :cond_0
    const/high16 v1, 0x6

    goto :goto_0

    .line 125
    :cond_1
    new-instance v1, Lcom/glympse/android/glympse/ViewFavorites$OnClickedItem;

    invoke-direct {v1, p0}, Lcom/glympse/android/glympse/ViewFavorites$OnClickedItem;-><init>(Lcom/glympse/android/glympse/ViewFavorites;)V

    goto :goto_1
.end method

.method static synthetic access$0(Lcom/glympse/android/glympse/ViewFavorites;)Landroid/widget/ListView;
    .locals 1
    .parameter

    .prologue
    .line 43
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oListView:Landroid/widget/ListView;

    return-object v0
.end method

.method static synthetic access$1(Lcom/glympse/android/glympse/ViewFavorites;Landroid/widget/TextView;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 44
    iput-object p1, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oTextView:Landroid/widget/TextView;

    return-void
.end method

.method static synthetic access$2(Lcom/glympse/android/glympse/ViewFavorites;Landroid/widget/ListView;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 43
    iput-object p1, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oListView:Landroid/widget/ListView;

    return-void
.end method

.method static synthetic access$3(Lcom/glympse/android/glympse/ViewFavorites;)Landroid/widget/TextView;
    .locals 1
    .parameter

    .prologue
    .line 44
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oTextView:Landroid/widget/TextView;

    return-object v0
.end method

.method static synthetic access$4(Lcom/glympse/android/glympse/ViewFavorites;Lcom/glympse/android/glympse/ViewFavorites$TicketAdapter;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 46
    iput-object p1, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oTicketAdapter:Lcom/glympse/android/glympse/ViewFavorites$TicketAdapter;

    return-void
.end method

.method static synthetic access$5(Lcom/glympse/android/glympse/ViewFavorites;)V
    .locals 0
    .parameter

    .prologue
    .line 118
    invoke-direct {p0}, Lcom/glympse/android/glympse/ViewFavorites;->UpdateExpandStyles()V

    return-void
.end method

.method static synthetic access$6(Lcom/glympse/android/glympse/ViewFavorites;)V
    .locals 0
    .parameter

    .prologue
    .line 101
    invoke-direct {p0}, Lcom/glympse/android/glympse/ViewFavorites;->SetEmptyText()V

    return-void
.end method

.method static synthetic access$7(Lcom/glympse/android/glympse/ViewFavorites;)V
    .locals 0
    .parameter

    .prologue
    .line 107
    invoke-direct {p0}, Lcom/glympse/android/glympse/ViewFavorites;->BuildTicketList()V

    return-void
.end method

.method static synthetic access$8(Lcom/glympse/android/glympse/ViewFavorites;)Lcom/glympse/android/glympse/ViewFavorites$TicketAdapter;
    .locals 1
    .parameter

    .prologue
    .line 46
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oTicketAdapter:Lcom/glympse/android/glympse/ViewFavorites$TicketAdapter;

    return-object v0
.end method

.method static synthetic access$9(Lcom/glympse/android/glympse/ViewFavorites;Lcom/glympse/platform/common/Ticket;Z)V
    .locals 0
    .parameter
    .parameter
    .parameter

    .prologue
    .line 147
    invoke-direct {p0, p1, p2}, Lcom/glympse/android/glympse/ViewFavorites;->Send(Lcom/glympse/platform/common/Ticket;Z)V

    return-void
.end method


# virtual methods
.method public ToggleExpand()V
    .locals 1

    .prologue
    .line 133
    iget-boolean v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_fExpanded:Z

    if-eqz v0, :cond_1

    const/4 v0, 0x0

    :goto_0
    iput-boolean v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_fExpanded:Z

    .line 136
    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    invoke-static {v0}, Lcom/glympse/platform/Reflection$_Activity;->invalidateOptionsMenu(Landroid/app/Activity;)V

    .line 138
    invoke-direct {p0}, Lcom/glympse/android/glympse/ViewFavorites;->UpdateExpandStyles()V

    .line 140
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oTicketAdapter:Lcom/glympse/android/glympse/ViewFavorites$TicketAdapter;

    if-eqz v0, :cond_0

    .line 142
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewFavorites;->m_oTicketAdapter:Lcom/glympse/android/glympse/ViewFavorites$TicketAdapter;

    invoke-virtual {v0}, Lcom/glympse/android/glympse/ViewFavorites$TicketAdapter;->notifyDataSetChanged()V

    .line 144
    :cond_0
    return-void

    .line 133
    :cond_1
    const/4 v0, 0x1

    goto :goto_0
.end method
